package com.ruoyi.common.cont;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * SysConst
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/5/10 17:06
 */
public class SysConst {

    /** 导出模式 */
    public static final int EXPORT_MODEL = 2;

    /** 导入模式 */
    public static final int IMPORT_MODEL = 1;

    @Getter
    @AllArgsConstructor
    public enum Flag {
        IS(1, "是"),
        NO(0, "否");
        private final Integer flag;
        private final String name;

        @Override
        public String toString() {
            return this.getFlag().toString();
        }

        public static String[] arrayName()
        {
            Flag[] flags = values();
            String[] arrayName = new String[flags.length];
            for (int i = 0; i < flags.length; i++) {
                arrayName[i] = flags[i].getName();
            }
            return arrayName;
        }
    }

    @Getter
    @AllArgsConstructor
    public enum OPERATE {
        /** 修改操作 */
        UPDATE("update", "修改"),
        /** 新增操作 */
        SAVE("save", "新增"),
        /** 删除操作 */
        DELETE("delete", "删除"),
        /** 分页操作 */
        PAGE("page", "分页"),
        /** 列表操作 */
        LIST("list", "列表"),
        /** 导出操作 */
        EXPORT("export", "导出"),
        ;
        private final String code;
        private final String name;

        @Override
        public String toString() {
            return super.toString();
        }
    }
}
